package com.osdp.common.util;

import org.springframework.security.crypto.password.PasswordEncoder;

public class DefaultPasswordEncoder implements PasswordEncoder {

    @Override
    public String encode(CharSequence charSequence) {
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String encodedPassword) {
        return charSequence.toString().equals(encodedPassword);
    }

    private static final DefaultPasswordEncoder INSTANCE = new DefaultPasswordEncoder();

    public static DefaultPasswordEncoder getInstance(){
        return INSTANCE;
    }

    private DefaultPasswordEncoder(){

    }
}
